package com.ruoyi.system.controller;

import com.github.pagehelper.PageHelper;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.ErpChangeStatistics;
import com.ruoyi.system.domain.ErpStatistics;
import com.ruoyi.system.service.IErpChangeStatisticsService;
import com.ruoyi.system.service.IErpStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 换货统计Controller
 *
 * @author ruoyi
 * @date 2025-03-12
 */
@RestController
@RequestMapping("/system/changeStatistics")
public class ErpChangeStatisticsController extends BaseController {
    @Autowired
    private IErpChangeStatisticsService erpChangeStatisticsService;
    /**
     * 查询商品列表
     */
    @PreAuthorize("@ss.hasPermi('system:changeStatistics:list')")
    @GetMapping("/list")
    public TableDataInfo list(@RequestParam(defaultValue = "1") int pageNum,
                              @RequestParam(defaultValue = "10") int pageSize,
                              ErpChangeStatistics erpChangeStatistics) {
        PageHelper.startPage(pageNum, pageSize);
        List<ErpChangeStatistics> list = erpChangeStatisticsService.selectErpChangeStatisticsList(erpChangeStatistics);
        return getDataTable(list);
    }
}
